.class public final Lcom/google/android/gms/internal/k0;
.super Lcom/google/android/gms/internal/p;


# static fields
.field public static final B:Ljava/lang/String;


# instance fields
.field private final A:Lcom/google/android/gms/internal/o0;

.field private i:J

.field private j:Lcom/google/android/gms/cast/k;

.field private final k:Ljava/util/List;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List<",
            "Lcom/google/android/gms/internal/o0;",
            ">;"
        }
    .end annotation
.end field

.field private l:Lcom/google/android/gms/internal/l0;

.field private final m:Lcom/google/android/gms/internal/o0;

.field private final n:Lcom/google/android/gms/internal/o0;

.field private final o:Lcom/google/android/gms/internal/o0;

.field private final p:Lcom/google/android/gms/internal/o0;

.field private final q:Lcom/google/android/gms/internal/o0;

.field private final r:Lcom/google/android/gms/internal/o0;

.field private final s:Lcom/google/android/gms/internal/o0;

.field private final t:Lcom/google/android/gms/internal/o0;

.field private final u:Lcom/google/android/gms/internal/o0;

.field private final v:Lcom/google/android/gms/internal/o0;

.field private final w:Lcom/google/android/gms/internal/o0;

.field private final x:Lcom/google/android/gms/internal/o0;

.field private final y:Lcom/google/android/gms/internal/o0;

.field private final z:Lcom/google/android/gms/internal/o0;


# direct methods
.method static constructor <clinit>()V
    .locals 1

    const-string v0, "com.google.cast.media"

    invoke-static {v0}, Lcom/google/android/gms/internal/a0;->b(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    sput-object v0, Lcom/google/android/gms/internal/k0;->B:Ljava/lang/String;

    return-void
.end method

.method public constructor <init>(Ljava/lang/String;Lcom/google/android/gms/common/util/b;)V
    .locals 7

    sget-object v1, Lcom/google/android/gms/internal/k0;->B:Ljava/lang/String;

    const-string v3, "MediaControlChannel"

    const/4 v4, 0x0

    const-wide/16 v5, 0x3e8

    move-object v0, p0

    move-object v2, p2

    invoke-direct/range {v0 .. v6}, Lcom/google/android/gms/internal/p;-><init>(Ljava/lang/String;Lcom/google/android/gms/common/util/b;Ljava/lang/String;Ljava/lang/String;J)V

    new-instance p1, Lcom/google/android/gms/internal/o0;

    iget-object p2, p0, Lcom/google/android/gms/internal/p;->e:Lcom/google/android/gms/common/util/b;

    const-wide/32 v0, 0x5265c00

    invoke-direct {p1, p2, v0, v1}, Lcom/google/android/gms/internal/o0;-><init>(Lcom/google/android/gms/common/util/b;J)V

    iput-object p1, p0, Lcom/google/android/gms/internal/k0;->m:Lcom/google/android/gms/internal/o0;

    new-instance p1, Lcom/google/android/gms/internal/o0;

    iget-object p2, p0, Lcom/google/android/gms/internal/p;->e:Lcom/google/android/gms/common/util/b;

    invoke-direct {p1, p2, v0, v1}, Lcom/google/android/gms/internal/o0;-><init>(Lcom/google/android/gms/common/util/b;J)V

    iput-object p1, p0, Lcom/google/android/gms/internal/k0;->n:Lcom/google/android/gms/internal/o0;

    new-instance p1, Lcom/google/android/gms/internal/o0;

    iget-object p2, p0, Lcom/google/android/gms/internal/p;->e:Lcom/google/android/gms/common/util/b;

    invoke-direct {p1, p2, v0, v1}, Lcom/google/android/gms/internal/o0;-><init>(Lcom/google/android/gms/common/util/b;J)V

    iput-object p1, p0, Lcom/google/android/gms/internal/k0;->o:Lcom/google/android/gms/internal/o0;

    new-instance p1, Lcom/google/android/gms/internal/o0;

    iget-object p2, p0, Lcom/google/android/gms/internal/p;->e:Lcom/google/android/gms/common/util/b;

    invoke-direct {p1, p2, v0, v1}, Lcom/google/android/gms/internal/o0;-><init>(Lcom/google/android/gms/common/util/b;J)V

    iput-object p1, p0, Lcom/google/android/gms/internal/k0;->p:Lcom/google/android/gms/internal/o0;

    new-instance p1, Lcom/google/android/gms/internal/o0;

    iget-object p2, p0, Lcom/google/android/gms/internal/p;->e:Lcom/google/android/gms/common/util/b;

    invoke-direct {p1, p2, v0, v1}, Lcom/google/android/gms/internal/o0;-><init>(Lcom/google/android/gms/common/util/b;J)V

    iput-object p1, p0, Lcom/google/android/gms/internal/k0;->q:Lcom/google/android/gms/internal/o0;

    new-instance p1, Lcom/google/android/gms/internal/o0;

    iget-object p2, p0, Lcom/google/android/gms/internal/p;->e:Lcom/google/android/gms/common/util/b;

    invoke-direct {p1, p2, v0, v1}, Lcom/google/android/gms/internal/o0;-><init>(Lcom/google/android/gms/common/util/b;J)V

    iput-object p1, p0, Lcom/google/android/gms/internal/k0;->r:Lcom/google/android/gms/internal/o0;

    new-instance p1, Lcom/google/android/gms/internal/o0;

    iget-object p2, p0, Lcom/google/android/gms/internal/p;->e:Lcom/google/android/gms/common/util/b;

    invoke-direct {p1, p2, v0, v1}, Lcom/google/android/gms/internal/o0;-><init>(Lcom/google/android/gms/common/util/b;J)V

    iput-object p1, p0, Lcom/google/android/gms/internal/k0;->s:Lcom/google/android/gms/internal/o0;

    new-instance p1, Lcom/google/android/gms/internal/o0;

    iget-object p2, p0, Lcom/google/android/gms/internal/p;->e:Lcom/google/android/gms/common/util/b;

    invoke-direct {p1, p2, v0, v1}, Lcom/google/android/gms/internal/o0;-><init>(Lcom/google/android/gms/common/util/b;J)V

    iput-object p1, p0, Lcom/google/android/gms/internal/k0;->t:Lcom/google/android/gms/internal/o0;

    new-instance p1, Lcom/google/android/gms/internal/o0;

    iget-object p2, p0, Lcom/google/android/gms/internal/p;->e:Lcom/google/android/gms/common/util/b;

    invoke-direct {p1, p2, v0, v1}, Lcom/google/android/gms/internal/o0;-><init>(Lcom/google/android/gms/common/util/b;J)V

    iput-object p1, p0, Lcom/google/android/gms/internal/k0;->u:Lcom/google/android/gms/internal/o0;

    new-instance p1, Lcom/google/android/gms/internal/o0;

    iget-object p2, p0, Lcom/google/android/gms/internal/p;->e:Lcom/google/android/gms/common/util/b;

    invoke-direct {p1, p2, v0, v1}, Lcom/google/android/gms/internal/o0;-><init>(Lcom/google/android/gms/common/util/b;J)V

    iput-object p1, p0, Lcom/google/android/gms/internal/k0;->v:Lcom/google/android/gms/internal/o0;

    new-instance p1, Lcom/google/android/gms/internal/o0;

    iget-object p2, p0, Lcom/google/android/gms/internal/p;->e:Lcom/google/android/gms/common/util/b;

    invoke-direct {p1, p2, v0, v1}, Lcom/google/android/gms/internal/o0;-><init>(Lcom/google/android/gms/common/util/b;J)V

    iput-object p1, p0, Lcom/google/android/gms/internal/k0;->w:Lcom/google/android/gms/internal/o0;

    new-instance p1, Lcom/google/android/gms/internal/o0;

    iget-object p2, p0, Lcom/google/android/gms/internal/p;->e:Lcom/google/android/gms/common/util/b;

    invoke-direct {p1, p2, v0, v1}, Lcom/google/android/gms/internal/o0;-><init>(Lcom/google/android/gms/common/util/b;J)V

    iput-object p1, p0, Lcom/google/android/gms/internal/k0;->x:Lcom/google/android/gms/internal/o0;

    new-instance p1, Lcom/google/android/gms/internal/o0;

    iget-object p2, p0, Lcom/google/android/gms/internal/p;->e:Lcom/google/android/gms/common/util/b;

    invoke-direct {p1, p2, v0, v1}, Lcom/google/android/gms/internal/o0;-><init>(Lcom/google/android/gms/common/util/b;J)V

    iput-object p1, p0, Lcom/google/android/gms/internal/k0;->y:Lcom/google/android/gms/internal/o0;

    new-instance p1, Lcom/google/android/gms/internal/o0;

    iget-object p2, p0, Lcom/google/android/gms/internal/p;->e:Lcom/google/android/gms/common/util/b;

    invoke-direct {p1, p2, v0, v1}, Lcom/google/android/gms/internal/o0;-><init>(Lcom/google/android/gms/common/util/b;J)V

    iput-object p1, p0, Lcom/google/android/gms/internal/k0;->z:Lcom/google/android/gms/internal/o0;

    new-instance p1, Lcom/google/android/gms/internal/o0;

    iget-object p2, p0, Lcom/google/android/gms/internal/p;->e:Lcom/google/android/gms/common/util/b;

    invoke-direct {p1, p2, v0, v1}, Lcom/google/android/gms/internal/o0;-><init>(Lcom/google/android/gms/common/util/b;J)V

    iput-object p1, p0, Lcom/google/android/gms/internal/k0;->A:Lcom/google/android/gms/internal/o0;

    new-instance p1, Ljava/util/ArrayList;

    invoke-direct {p1}, Ljava/util/ArrayList;-><init>()V

    iput-object p1, p0, Lcom/google/android/gms/internal/k0;->k:Ljava/util/List;

    iget-object p2, p0, Lcom/google/android/gms/internal/k0;->m:Lcom/google/android/gms/internal/o0;

    invoke-interface {p1, p2}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    iget-object p1, p0, Lcom/google/android/gms/internal/k0;->k:Ljava/util/List;

    iget-object p2, p0, Lcom/google/android/gms/internal/k0;->n:Lcom/google/android/gms/internal/o0;

    invoke-interface {p1, p2}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    iget-object p1, p0, Lcom/google/android/gms/internal/k0;->k:Ljava/util/List;

    iget-object p2, p0, Lcom/google/android/gms/internal/k0;->o:Lcom/google/android/gms/internal/o0;

    invoke-interface {p1, p2}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    iget-object p1, p0, Lcom/google/android/gms/internal/k0;->k:Ljava/util/List;

    iget-object p2, p0, Lcom/google/android/gms/internal/k0;->p:Lcom/google/android/gms/internal/o0;

    invoke-interface {p1, p2}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    iget-object p1, p0, Lcom/google/android/gms/internal/k0;->k:Ljava/util/List;

    iget-object p2, p0, Lcom/google/android/gms/internal/k0;->q:Lcom/google/android/gms/internal/o0;

    invoke-interface {p1, p2}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    iget-object p1, p0, Lcom/google/android/gms/internal/k0;->k:Ljava/util/List;

    iget-object p2, p0, Lcom/google/android/gms/internal/k0;->r:Lcom/google/android/gms/internal/o0;

    invoke-interface {p1, p2}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    iget-object p1, p0, Lcom/google/android/gms/internal/k0;->k:Ljava/util/List;

    iget-object p2, p0, Lcom/google/android/gms/internal/k0;->s:Lcom/google/android/gms/internal/o0;

    invoke-interface {p1, p2}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    iget-object p1, p0, Lcom/google/android/gms/internal/k0;->k:Ljava/util/List;

    iget-object p2, p0, Lcom/google/android/gms/internal/k0;->t:Lcom/google/android/gms/internal/o0;

    invoke-interface {p1, p2}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    iget-object p1, p0, Lcom/google/android/gms/internal/k0;->k:Ljava/util/List;

    iget-object p2, p0, Lcom/google/android/gms/internal/k0;->u:Lcom/google/android/gms/internal/o0;

    invoke-interface {p1, p2}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    iget-object p1, p0, Lcom/google/android/gms/internal/k0;->k:Ljava/util/List;

    iget-object p2, p0, Lcom/google/android/gms/internal/k0;->v:Lcom/google/android/gms/internal/o0;

    invoke-interface {p1, p2}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    iget-object p1, p0, Lcom/google/android/gms/internal/k0;->k:Ljava/util/List;

    iget-object p2, p0, Lcom/google/android/gms/internal/k0;->w:Lcom/google/android/gms/internal/o0;

    invoke-interface {p1, p2}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    iget-object p1, p0, Lcom/google/android/gms/internal/k0;->k:Ljava/util/List;

    iget-object p2, p0, Lcom/google/android/gms/internal/k0;->x:Lcom/google/android/gms/internal/o0;

    invoke-interface {p1, p2}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    iget-object p1, p0, Lcom/google/android/gms/internal/k0;->k:Ljava/util/List;

    iget-object p2, p0, Lcom/google/android/gms/internal/k0;->y:Lcom/google/android/gms/internal/o0;

    invoke-interface {p1, p2}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    iget-object p1, p0, Lcom/google/android/gms/internal/k0;->k:Ljava/util/List;

    iget-object p2, p0, Lcom/google/android/gms/internal/k0;->z:Lcom/google/android/gms/internal/o0;

    invoke-interface {p1, p2}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    iget-object p1, p0, Lcom/google/android/gms/internal/k0;->k:Ljava/util/List;

    iget-object p2, p0, Lcom/google/android/gms/internal/k0;->A:Lcom/google/android/gms/internal/o0;

    invoke-interface {p1, p2}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    invoke-direct {p0}, Lcom/google/android/gms/internal/k0;->m()V

    return-void
.end method

.method private final a(JLorg/json/JSONObject;)V
    .locals 5
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Lorg/json/JSONException;
        }
    .end annotation

    iget-object v0, p0, Lcom/google/android/gms/internal/k0;->m:Lcom/google/android/gms/internal/o0;

    invoke-virtual {v0, p1, p2}, Lcom/google/android/gms/internal/o0;->a(J)Z

    move-result v0

    iget-object v1, p0, Lcom/google/android/gms/internal/k0;->q:Lcom/google/android/gms/internal/o0;

    invoke-virtual {v1}, Lcom/google/android/gms/internal/o0;->b()Z

    move-result v1

    const/4 v2, 0x1

    const/4 v3, 0x0

    if-eqz v1, :cond_0

    iget-object v1, p0, Lcom/google/android/gms/internal/k0;->q:Lcom/google/android/gms/internal/o0;

    invoke-virtual {v1, p1, p2}, Lcom/google/android/gms/internal/o0;->a(J)Z

    move-result v1

    if-nez v1, :cond_0

    const/4 v1, 0x1

    goto :goto_0

    :cond_0
    const/4 v1, 0x0

    :goto_0
    iget-object v4, p0, Lcom/google/android/gms/internal/k0;->r:Lcom/google/android/gms/internal/o0;

    invoke-virtual {v4}, Lcom/google/android/gms/internal/o0;->b()Z

    move-result v4

    if-eqz v4, :cond_1

    iget-object v4, p0, Lcom/google/android/gms/internal/k0;->r:Lcom/google/android/gms/internal/o0;

    invoke-virtual {v4, p1, p2}, Lcom/google/android/gms/internal/o0;->a(J)Z

    move-result v4

    if-eqz v4, :cond_3

    :cond_1
    iget-object v4, p0, Lcom/google/android/gms/internal/k0;->s:Lcom/google/android/gms/internal/o0;

    invoke-virtual {v4}, Lcom/google/android/gms/internal/o0;->b()Z

    move-result v4

    if-eqz v4, :cond_2

    iget-object v4, p0, Lcom/google/android/gms/internal/k0;->s:Lcom/google/android/gms/internal/o0;

    invoke-virtual {v4, p1, p2}, Lcom/google/android/gms/internal/o0;->a(J)Z

    move-result v4

    if-nez v4, :cond_2

    goto :goto_1

    :cond_2
    const/4 v2, 0x0

    :cond_3
    :goto_1
    if-eqz v1, :cond_4

    const/4 v1, 0x2

    goto :goto_2

    :cond_4
    const/4 v1, 0x0

    :goto_2
    if-eqz v2, :cond_5

    or-int/lit8 v1, v1, 0x1

    :cond_5
    if-nez v0, :cond_7

    iget-object v0, p0, Lcom/google/android/gms/internal/k0;->j:Lcom/google/android/gms/cast/k;

    if-nez v0, :cond_6

    goto :goto_3

    :cond_6
    invoke-virtual {v0, p3, v1}, Lcom/google/android/gms/cast/k;->a(Lorg/json/JSONObject;I)I

    move-result p3

    goto :goto_4

    :cond_7
    :goto_3
    new-instance v0, Lcom/google/android/gms/cast/k;

    invoke-direct {v0, p3}, Lcom/google/android/gms/cast/k;-><init>(Lorg/json/JSONObject;)V

    iput-object v0, p0, Lcom/google/android/gms/internal/k0;->j:Lcom/google/android/gms/cast/k;

    iget-object p3, p0, Lcom/google/android/gms/internal/p;->e:Lcom/google/android/gms/common/util/b;

    invoke-interface {p3}, Lcom/google/android/gms/common/util/b;->b()J

    move-result-wide v0

    iput-wide v0, p0, Lcom/google/android/gms/internal/k0;->i:J

    const/16 p3, 0x7f

    :goto_4
    and-int/lit8 v0, p3, 0x1

    if-eqz v0, :cond_8

    iget-object v0, p0, Lcom/google/android/gms/internal/p;->e:Lcom/google/android/gms/common/util/b;

    invoke-interface {v0}, Lcom/google/android/gms/common/util/b;->b()J

    move-result-wide v0

    iput-wide v0, p0, Lcom/google/android/gms/internal/k0;->i:J

    invoke-direct {p0}, Lcom/google/android/gms/internal/k0;->k()V

    :cond_8
    and-int/lit8 v0, p3, 0x2

    if-eqz v0, :cond_9

    iget-object v0, p0, Lcom/google/android/gms/internal/p;->e:Lcom/google/android/gms/common/util/b;

    invoke-interface {v0}, Lcom/google/android/gms/common/util/b;->b()J

    move-result-wide v0

    iput-wide v0, p0, Lcom/google/android/gms/internal/k0;->i:J

    invoke-direct {p0}, Lcom/google/android/gms/internal/k0;->k()V

    :cond_9
    and-int/lit8 v0, p3, 0x4

    if-eqz v0, :cond_a

    invoke-direct {p0}, Lcom/google/android/gms/internal/k0;->h()V

    :cond_a
    and-int/lit8 v0, p3, 0x8

    if-eqz v0, :cond_b

    invoke-direct {p0}, Lcom/google/android/gms/internal/k0;->j()V

    :cond_b
    and-int/lit8 v0, p3, 0x10

    if-eqz v0, :cond_c

    invoke-direct {p0}, Lcom/google/android/gms/internal/k0;->i()V

    :cond_c
    and-int/lit8 v0, p3, 0x20

    if-eqz v0, :cond_d

    iget-object v0, p0, Lcom/google/android/gms/internal/p;->e:Lcom/google/android/gms/common/util/b;

    invoke-interface {v0}, Lcom/google/android/gms/common/util/b;->b()J

    move-result-wide v0

    iput-wide v0, p0, Lcom/google/android/gms/internal/k0;->i:J

    iget-object v0, p0, Lcom/google/android/gms/internal/k0;->l:Lcom/google/android/gms/internal/l0;

    if-eqz v0, :cond_d

    invoke-interface {v0}, Lcom/google/android/gms/internal/l0;->c()V

    :cond_d
    and-int/lit8 p3, p3, 0x40

    if-eqz p3, :cond_e

    iget-object p3, p0, Lcom/google/android/gms/internal/p;->e:Lcom/google/android/gms/common/util/b;

    invoke-interface {p3}, Lcom/google/android/gms/common/util/b;->b()J

    move-result-wide v0

    iput-wide v0, p0, Lcom/google/android/gms/internal/k0;->i:J

    invoke-direct {p0}, Lcom/google/android/gms/internal/k0;->k()V

    :cond_e
    iget-object p3, p0, Lcom/google/android/gms/internal/k0;->k:Ljava/util/List;

    invoke-interface {p3}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object p3

    :goto_5
    invoke-interface {p3}, Ljava/util/Iterator;->hasNext()Z

    move-result v0

    if-eqz v0, :cond_f

    invoke-interface {p3}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/google/android/gms/internal/o0;

    const/4 v1, 0x0

    invoke-virtual {v0, p1, p2, v3, v1}, Lcom/google/android/gms/internal/o0;->a(JILjava/lang/Object;)Z

    goto :goto_5

    :cond_f
    return-void
.end method

.method private final h()V
    .locals 1

    iget-object v0, p0, Lcom/google/android/gms/internal/k0;->l:Lcom/google/android/gms/internal/l0;

    if-eqz v0, :cond_0

    invoke-interface {v0}, Lcom/google/android/gms/internal/l0;->onMetadataUpdated()V

    :cond_0
    return-void
.end method

.method private final i()V
    .locals 1

    iget-object v0, p0, Lcom/google/android/gms/internal/k0;->l:Lcom/google/android/gms/internal/l0;

    if-eqz v0, :cond_0

    invoke-interface {v0}, Lcom/google/android/gms/internal/l0;->b()V

    :cond_0
    return-void
.end method

.method private final j()V
    .locals 1

    iget-object v0, p0, Lcom/google/android/gms/internal/k0;->l:Lcom/google/android/gms/internal/l0;

    if-eqz v0, :cond_0

    invoke-interface {v0}, Lcom/google/android/gms/internal/l0;->a()V

    :cond_0
    return-void
.end method

.method private final k()V
    .locals 1

    iget-object v0, p0, Lcom/google/android/gms/internal/k0;->l:Lcom/google/android/gms/internal/l0;

    if-eqz v0, :cond_0

    invoke-interface {v0}, Lcom/google/android/gms/internal/l0;->onStatusUpdated()V

    :cond_0
    return-void
.end method

.method private final l()J
    .locals 2
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Lcom/google/android/gms/internal/zzbdb;
        }
    .end annotation

    iget-object v0, p0, Lcom/google/android/gms/internal/k0;->j:Lcom/google/android/gms/cast/k;

    if-eqz v0, :cond_0

    invoke-virtual {v0}, Lcom/google/android/gms/cast/k;->v()J

    move-result-wide v0

    return-wide v0

    :cond_0
    new-instance v0, Lcom/google/android/gms/internal/zzbdb;

    invoke-direct {v0}, Lcom/google/android/gms/internal/zzbdb;-><init>()V

    throw v0
.end method

.method private final m()V
    .locals 2

    const-wide/16 v0, 0x0

    iput-wide v0, p0, Lcom/google/android/gms/internal/k0;->i:J

    const/4 v0, 0x0

    iput-object v0, p0, Lcom/google/android/gms/internal/k0;->j:Lcom/google/android/gms/cast/k;

    iget-object v0, p0, Lcom/google/android/gms/internal/k0;->k:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object v0

    :goto_0
    invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z

    move-result v1

    if-eqz v1, :cond_0

    invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Lcom/google/android/gms/internal/o0;

    invoke-virtual {v1}, Lcom/google/android/gms/internal/o0;->a()V

    goto :goto_0

    :cond_0
    return-void
.end method


# virtual methods
.method public final a(Lcom/google/android/gms/internal/n0;)J
    .locals 5
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;
        }
    .end annotation

    new-instance v0, Lorg/json/JSONObject;

    invoke-direct {v0}, Lorg/json/JSONObject;-><init>()V

    invoke-virtual {p0}, Lcom/google/android/gms/internal/s;->c()J

    move-result-wide v1

    iget-object v3, p0, Lcom/google/android/gms/internal/k0;->t:Lcom/google/android/gms/internal/o0;

    invoke-virtual {v3, v1, v2, p1}, Lcom/google/android/gms/internal/o0;->a(JLcom/google/android/gms/internal/n0;)V

    const/4 p1, 0x1

    invoke-virtual {p0, p1}, Lcom/google/android/gms/internal/p;->a(Z)V

    :try_start_0
    const-string p1, "requestId"

    invoke-virtual {v0, p1, v1, v2}, Lorg/json/JSONObject;->put(Ljava/lang/String;J)Lorg/json/JSONObject;

    const-string p1, "type"

    const-string v3, "GET_STATUS"

    invoke-virtual {v0, p1, v3}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    iget-object p1, p0, Lcom/google/android/gms/internal/k0;->j:Lcom/google/android/gms/cast/k;

    if-eqz p1, :cond_0

    const-string p1, "mediaSessionId"

    iget-object v3, p0, Lcom/google/android/gms/internal/k0;->j:Lcom/google/android/gms/cast/k;

    invoke-virtual {v3}, Lcom/google/android/gms/cast/k;->v()J

    move-result-wide v3

    invoke-virtual {v0, p1, v3, v4}, Lorg/json/JSONObject;->put(Ljava/lang/String;J)Lorg/json/JSONObject;
    :try_end_0
    .catch Lorg/json/JSONException; {:try_start_0 .. :try_end_0} :catch_0

    :catch_0
    :cond_0
    invoke-virtual {v0}, Lorg/json/JSONObject;->toString()Ljava/lang/String;

    move-result-object p1

    const/4 v0, 0x0

    invoke-virtual {p0, p1, v1, v2, v0}, Lcom/google/android/gms/internal/s;->a(Ljava/lang/String;JLjava/lang/String;)V

    return-wide v1
.end method

.method public final a(Lcom/google/android/gms/internal/n0;JILorg/json/JSONObject;)J
    .locals 6
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;,
            Lcom/google/android/gms/internal/zzbdb;
        }
    .end annotation

    new-instance v0, Lorg/json/JSONObject;

    invoke-direct {v0}, Lorg/json/JSONObject;-><init>()V

    invoke-virtual {p0}, Lcom/google/android/gms/internal/s;->c()J

    move-result-wide v1

    iget-object v3, p0, Lcom/google/android/gms/internal/k0;->q:Lcom/google/android/gms/internal/o0;

    invoke-virtual {v3, v1, v2, p1}, Lcom/google/android/gms/internal/o0;->a(JLcom/google/android/gms/internal/n0;)V

    const/4 p1, 0x1

    invoke-virtual {p0, p1}, Lcom/google/android/gms/internal/p;->a(Z)V

    :try_start_0
    const-string v3, "requestId"

    invoke-virtual {v0, v3, v1, v2}, Lorg/json/JSONObject;->put(Ljava/lang/String;J)Lorg/json/JSONObject;

    const-string v3, "type"

    const-string v4, "SEEK"

    invoke-virtual {v0, v3, v4}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    const-string v3, "mediaSessionId"

    invoke-direct {p0}, Lcom/google/android/gms/internal/k0;->l()J

    move-result-wide v4

    invoke-virtual {v0, v3, v4, v5}, Lorg/json/JSONObject;->put(Ljava/lang/String;J)Lorg/json/JSONObject;

    const-string v3, "currentTime"
    :try_end_0
    .catch Lorg/json/JSONException; {:try_start_0 .. :try_end_0} :catch_0

    long-to-double p2, p2

    const-wide v4, 0x408f400000000000L    # 1000.0

    invoke-static {p2, p3}, Ljava/lang/Double;->isNaN(D)Z

    div-double/2addr p2, v4

    :try_start_1
    invoke-virtual {v0, v3, p2, p3}, Lorg/json/JSONObject;->put(Ljava/lang/String;D)Lorg/json/JSONObject;
    :try_end_1
    .catch Lorg/json/JSONException; {:try_start_1 .. :try_end_1} :catch_0

    const-string p2, "resumeState"

    if-ne p4, p1, :cond_0

    :try_start_2
    const-string p1, "PLAYBACK_START"

    :goto_0
    invoke-virtual {v0, p2, p1}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    goto :goto_1

    :cond_0
    const/4 p1, 0x2

    if-ne p4, p1, :cond_1

    const-string p1, "PLAYBACK_PAUSE"

    goto :goto_0

    :cond_1
    :goto_1
    if-eqz p5, :cond_2

    const-string p1, "customData"

    invoke-virtual {v0, p1, p5}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;
    :try_end_2
    .catch Lorg/json/JSONException; {:try_start_2 .. :try_end_2} :catch_0

    :catch_0
    :cond_2
    invoke-virtual {v0}, Lorg/json/JSONObject;->toString()Ljava/lang/String;

    move-result-object p1

    const/4 p2, 0x0

    invoke-virtual {p0, p1, v1, v2, p2}, Lcom/google/android/gms/internal/s;->a(Ljava/lang/String;JLjava/lang/String;)V

    return-wide v1
.end method

.method public final a(Lcom/google/android/gms/internal/n0;Lcom/google/android/gms/cast/MediaInfo;Lcom/google/android/gms/cast/h;)J
    .locals 7
    .param p1    # Lcom/google/android/gms/internal/n0;
        .annotation build Landroidx/annotation/NonNull;
        .end annotation
    .end param
    .param p2    # Lcom/google/android/gms/cast/MediaInfo;
        .annotation build Landroidx/annotation/NonNull;
        .end annotation
    .end param
    .param p3    # Lcom/google/android/gms/cast/h;
        .annotation build Landroidx/annotation/NonNull;
        .end annotation
    .end param
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;
        }
    .end annotation

    new-instance v0, Lorg/json/JSONObject;

    invoke-direct {v0}, Lorg/json/JSONObject;-><init>()V

    invoke-virtual {p0}, Lcom/google/android/gms/internal/s;->c()J

    move-result-wide v1

    iget-object v3, p0, Lcom/google/android/gms/internal/k0;->m:Lcom/google/android/gms/internal/o0;

    invoke-virtual {v3, v1, v2, p1}, Lcom/google/android/gms/internal/o0;->a(JLcom/google/android/gms/internal/n0;)V

    const/4 p1, 0x1

    invoke-virtual {p0, p1}, Lcom/google/android/gms/internal/p;->a(Z)V

    :try_start_0
    const-string p1, "requestId"

    invoke-virtual {v0, p1, v1, v2}, Lorg/json/JSONObject;->put(Ljava/lang/String;J)Lorg/json/JSONObject;

    const-string p1, "type"

    const-string v3, "LOAD"

    invoke-virtual {v0, p1, v3}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    const-string p1, "media"

    invoke-virtual {p2}, Lcom/google/android/gms/cast/MediaInfo;->q()Lorg/json/JSONObject;

    move-result-object p2

    invoke-virtual {v0, p1, p2}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    const-string p1, "autoplay"

    invoke-virtual {p3}, Lcom/google/android/gms/cast/h;->b()Z

    move-result p2

    invoke-virtual {v0, p1, p2}, Lorg/json/JSONObject;->put(Ljava/lang/String;Z)Lorg/json/JSONObject;

    const-string p1, "currentTime"

    invoke-virtual {p3}, Lcom/google/android/gms/cast/h;->d()J

    move-result-wide v3
    :try_end_0
    .catch Lorg/json/JSONException; {:try_start_0 .. :try_end_0} :catch_0

    long-to-double v3, v3

    const-wide v5, 0x408f400000000000L    # 1000.0

    invoke-static {v3, v4}, Ljava/lang/Double;->isNaN(D)Z

    div-double/2addr v3, v5

    :try_start_1
    invoke-virtual {v0, p1, v3, v4}, Lorg/json/JSONObject;->put(Ljava/lang/String;D)Lorg/json/JSONObject;

    const-string p1, "playbackRate"

    invoke-virtual {p3}, Lcom/google/android/gms/cast/h;->e()D

    move-result-wide v3

    invoke-virtual {v0, p1, v3, v4}, Lorg/json/JSONObject;->put(Ljava/lang/String;D)Lorg/json/JSONObject;

    invoke-virtual {p3}, Lcom/google/android/gms/cast/h;->a()[J

    move-result-object p1

    if-eqz p1, :cond_1

    new-instance p2, Lorg/json/JSONArray;

    invoke-direct {p2}, Lorg/json/JSONArray;-><init>()V

    const/4 v3, 0x0

    :goto_0
    array-length v4, p1

    if-ge v3, v4, :cond_0

    aget-wide v4, p1, v3

    invoke-virtual {p2, v3, v4, v5}, Lorg/json/JSONArray;->put(IJ)Lorg/json/JSONArray;

    add-int/lit8 v3, v3, 0x1

    goto :goto_0

    :cond_0
    const-string p1, "activeTrackIds"

    invoke-virtual {v0, p1, p2}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    :cond_1
    invoke-virtual {p3}, Lcom/google/android/gms/cast/h;->c()Lorg/json/JSONObject;

    move-result-object p1

    if-eqz p1, :cond_2

    const-string p2, "customData"

    invoke-virtual {v0, p2, p1}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;
    :try_end_1
    .catch Lorg/json/JSONException; {:try_start_1 .. :try_end_1} :catch_0

    :catch_0
    :cond_2
    invoke-virtual {v0}, Lorg/json/JSONObject;->toString()Ljava/lang/String;

    move-result-object p1

    const/4 p2, 0x0

    invoke-virtual {p0, p1, v1, v2, p2}, Lcom/google/android/gms/internal/s;->a(Ljava/lang/String;JLjava/lang/String;)V

    return-wide v1
.end method

.method public final a(Lcom/google/android/gms/internal/n0;Lorg/json/JSONObject;)J
    .locals 5
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;,
            Lcom/google/android/gms/internal/zzbdb;
        }
    .end annotation

    new-instance v0, Lorg/json/JSONObject;

    invoke-direct {v0}, Lorg/json/JSONObject;-><init>()V

    invoke-virtual {p0}, Lcom/google/android/gms/internal/s;->c()J

    move-result-wide v1

    iget-object v3, p0, Lcom/google/android/gms/internal/k0;->n:Lcom/google/android/gms/internal/o0;

    invoke-virtual {v3, v1, v2, p1}, Lcom/google/android/gms/internal/o0;->a(JLcom/google/android/gms/internal/n0;)V

    const/4 p1, 0x1

    invoke-virtual {p0, p1}, Lcom/google/android/gms/internal/p;->a(Z)V

    :try_start_0
    const-string p1, "requestId"

    invoke-virtual {v0, p1, v1, v2}, Lorg/json/JSONObject;->put(Ljava/lang/String;J)Lorg/json/JSONObject;

    const-string p1, "type"

    const-string v3, "PAUSE"

    invoke-virtual {v0, p1, v3}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    const-string p1, "mediaSessionId"

    invoke-direct {p0}, Lcom/google/android/gms/internal/k0;->l()J

    move-result-wide v3

    invoke-virtual {v0, p1, v3, v4}, Lorg/json/JSONObject;->put(Ljava/lang/String;J)Lorg/json/JSONObject;

    if-eqz p2, :cond_0

    const-string p1, "customData"

    invoke-virtual {v0, p1, p2}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;
    :try_end_0
    .catch Lorg/json/JSONException; {:try_start_0 .. :try_end_0} :catch_0

    :catch_0
    :cond_0
    invoke-virtual {v0}, Lorg/json/JSONObject;->toString()Ljava/lang/String;

    move-result-object p1

    const/4 p2, 0x0

    invoke-virtual {p0, p1, v1, v2, p2}, Lcom/google/android/gms/internal/s;->a(Ljava/lang/String;JLjava/lang/String;)V

    return-wide v1
.end method

.method public final a(JI)V
    .locals 3

    iget-object v0, p0, Lcom/google/android/gms/internal/k0;->k:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object v0

    :goto_0
    invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z

    move-result v1

    if-eqz v1, :cond_0

    invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Lcom/google/android/gms/internal/o0;

    const/4 v2, 0x0

    invoke-virtual {v1, p1, p2, p3, v2}, Lcom/google/android/gms/internal/o0;->a(JILjava/lang/Object;)Z

    goto :goto_0

    :cond_0
    return-void
.end method

.method public final a(Lcom/google/android/gms/internal/l0;)V
    .locals 0

    iput-object p1, p0, Lcom/google/android/gms/internal/k0;->l:Lcom/google/android/gms/internal/l0;

    return-void
.end method

.method protected final a(J)Z
    .locals 3

    iget-object v0, p0, Lcom/google/android/gms/internal/k0;->k:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object v0

    :goto_0
    invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z

    move-result v1

    if-eqz v1, :cond_0

    invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Lcom/google/android/gms/internal/o0;

    const/16 v2, 0x836

    invoke-virtual {v1, p1, p2, v2}, Lcom/google/android/gms/internal/o0;->a(JI)Z

    goto :goto_0

    :cond_0
    const/4 p1, 0x0

    sget-object p2, Lcom/google/android/gms/internal/o0;->g:Ljava/lang/Object;

    monitor-enter p2

    :try_start_0
    iget-object v0, p0, Lcom/google/android/gms/internal/k0;->k:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object v0

    :cond_1
    invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z

    move-result v1

    if-eqz v1, :cond_2

    invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Lcom/google/android/gms/internal/o0;

    invoke-virtual {v1}, Lcom/google/android/gms/internal/o0;->b()Z

    move-result v1

    if-eqz v1, :cond_1

    const/4 p1, 0x1

    :cond_2
    monitor-exit p2

    return p1

    :catchall_0
    move-exception p1

    monitor-exit p2
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    goto :goto_2

    :goto_1
    throw p1

    :goto_2
    goto :goto_1
.end method

.method public final b(Lcom/google/android/gms/internal/n0;Lorg/json/JSONObject;)J
    .locals 5
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;,
            Lcom/google/android/gms/internal/zzbdb;
        }
    .end annotation

    new-instance v0, Lorg/json/JSONObject;

    invoke-direct {v0}, Lorg/json/JSONObject;-><init>()V

    invoke-virtual {p0}, Lcom/google/android/gms/internal/s;->c()J

    move-result-wide v1

    iget-object v3, p0, Lcom/google/android/gms/internal/k0;->p:Lcom/google/android/gms/internal/o0;

    invoke-virtual {v3, v1, v2, p1}, Lcom/google/android/gms/internal/o0;->a(JLcom/google/android/gms/internal/n0;)V

    const/4 p1, 0x1

    invoke-virtual {p0, p1}, Lcom/google/android/gms/internal/p;->a(Z)V

    :try_start_0
    const-string p1, "requestId"

    invoke-virtual {v0, p1, v1, v2}, Lorg/json/JSONObject;->put(Ljava/lang/String;J)Lorg/json/JSONObject;

    const-string p1, "type"

    const-string v3, "STOP"

    invoke-virtual {v0, p1, v3}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    const-string p1, "mediaSessionId"

    invoke-direct {p0}, Lcom/google/android/gms/internal/k0;->l()J

    move-result-wide v3

    invoke-virtual {v0, p1, v3, v4}, Lorg/json/JSONObject;->put(Ljava/lang/String;J)Lorg/json/JSONObject;

    if-eqz p2, :cond_0

    const-string p1, "customData"

    invoke-virtual {v0, p1, p2}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;
    :try_end_0
    .catch Lorg/json/JSONException; {:try_start_0 .. :try_end_0} :catch_0

    :catch_0
    :cond_0
    invoke-virtual {v0}, Lorg/json/JSONObject;->toString()Ljava/lang/String;

    move-result-object p1

    const/4 p2, 0x0

    invoke-virtual {p0, p1, v1, v2, p2}, Lcom/google/android/gms/internal/s;->a(Ljava/lang/String;JLjava/lang/String;)V

    return-wide v1
.end method

.method public final b()V
    .locals 0

    invoke-super {p0}, Lcom/google/android/gms/internal/p;->b()V

    invoke-direct {p0}, Lcom/google/android/gms/internal/k0;->m()V

    return-void
.end method

.method public final b(Ljava/lang/String;)V
    .locals 11

    iget-object v0, p0, Lcom/google/android/gms/internal/s;->a:Lcom/google/android/gms/internal/j0;

    const/4 v1, 0x1

    new-array v2, v1, [Ljava/lang/Object;

    const/4 v3, 0x0

    aput-object p1, v2, v3

    const-string v4, "message received: %s"

    invoke-virtual {v0, v4, v2}, Lcom/google/android/gms/internal/j0;->a(Ljava/lang/String;[Ljava/lang/Object;)V

    const/4 v0, 0x2

    :try_start_0
    new-instance v2, Lorg/json/JSONObject;

    invoke-direct {v2, p1}, Lorg/json/JSONObject;-><init>(Ljava/lang/String;)V

    const-string v4, "type"

    invoke-virtual {v2, v4}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v4

    const-string v5, "requestId"

    const-wide/16 v6, -0x1

    invoke-virtual {v2, v5, v6, v7}, Lorg/json/JSONObject;->optLong(Ljava/lang/String;J)J

    move-result-wide v5

    const/4 v7, -0x1

    invoke-virtual {v4}, Ljava/lang/String;->hashCode()I

    move-result v8

    const/4 v9, 0x4

    const/4 v10, 0x3

    sparse-switch v8, :sswitch_data_0

    goto :goto_0

    :sswitch_0
    const-string v8, "MEDIA_STATUS"

    invoke-virtual {v4, v8}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v4

    if-eqz v4, :cond_0

    const/4 v7, 0x0

    goto :goto_0

    :sswitch_1
    const-string v8, "INVALID_PLAYER_STATE"

    invoke-virtual {v4, v8}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v4

    if-eqz v4, :cond_0

    const/4 v7, 0x1

    goto :goto_0

    :sswitch_2
    const-string v8, "LOAD_FAILED"

    invoke-virtual {v4, v8}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v4

    if-eqz v4, :cond_0

    const/4 v7, 0x2

    goto :goto_0

    :sswitch_3
    const-string v8, "INVALID_REQUEST"

    invoke-virtual {v4, v8}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v4

    if-eqz v4, :cond_0

    const/4 v7, 0x4

    goto :goto_0

    :sswitch_4
    const-string v8, "LOAD_CANCELLED"

    invoke-virtual {v4, v8}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v4
    :try_end_0
    .catch Lorg/json/JSONException; {:try_start_0 .. :try_end_0} :catch_0

    if-eqz v4, :cond_0

    const/4 v7, 0x3

    :cond_0
    :goto_0
    if-eqz v7, :cond_7

    const/16 v4, 0x834

    const-string v8, "customData"

    if-eq v7, v1, :cond_5

    if-eq v7, v0, :cond_4

    if-eq v7, v10, :cond_3

    if-eq v7, v9, :cond_1

    goto :goto_2

    :cond_1
    :try_start_1
    iget-object v7, p0, Lcom/google/android/gms/internal/s;->a:Lcom/google/android/gms/internal/j0;

    const-string v9, "received unexpected error: Invalid Request."

    new-array v10, v3, [Ljava/lang/Object;

    invoke-virtual {v7, v9, v10}, Lcom/google/android/gms/internal/j0;->c(Ljava/lang/String;[Ljava/lang/Object;)V

    invoke-virtual {v2, v8}, Lorg/json/JSONObject;->optJSONObject(Ljava/lang/String;)Lorg/json/JSONObject;

    move-result-object v2

    iget-object v7, p0, Lcom/google/android/gms/internal/k0;->k:Ljava/util/List;

    invoke-interface {v7}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object v7

    :goto_1
    invoke-interface {v7}, Ljava/util/Iterator;->hasNext()Z

    move-result v8

    if-eqz v8, :cond_2

    invoke-interface {v7}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v8

    check-cast v8, Lcom/google/android/gms/internal/o0;

    invoke-virtual {v8, v5, v6, v4, v2}, Lcom/google/android/gms/internal/o0;->a(JILjava/lang/Object;)Z

    goto :goto_1

    :cond_2
    :goto_2
    return-void

    :cond_3
    invoke-virtual {v2, v8}, Lorg/json/JSONObject;->optJSONObject(Ljava/lang/String;)Lorg/json/JSONObject;

    move-result-object v2

    iget-object v4, p0, Lcom/google/android/gms/internal/k0;->m:Lcom/google/android/gms/internal/o0;

    const/16 v7, 0x835

    invoke-virtual {v4, v5, v6, v7, v2}, Lcom/google/android/gms/internal/o0;->a(JILjava/lang/Object;)Z

    return-void

    :cond_4
    invoke-virtual {v2, v8}, Lorg/json/JSONObject;->optJSONObject(Ljava/lang/String;)Lorg/json/JSONObject;

    move-result-object v2

    iget-object v7, p0, Lcom/google/android/gms/internal/k0;->m:Lcom/google/android/gms/internal/o0;

    invoke-virtual {v7, v5, v6, v4, v2}, Lcom/google/android/gms/internal/o0;->a(JILjava/lang/Object;)Z

    return-void

    :cond_5
    iget-object v7, p0, Lcom/google/android/gms/internal/s;->a:Lcom/google/android/gms/internal/j0;

    const-string v9, "received unexpected error: Invalid Player State."

    new-array v10, v3, [Ljava/lang/Object;

    invoke-virtual {v7, v9, v10}, Lcom/google/android/gms/internal/j0;->c(Ljava/lang/String;[Ljava/lang/Object;)V

    invoke-virtual {v2, v8}, Lorg/json/JSONObject;->optJSONObject(Ljava/lang/String;)Lorg/json/JSONObject;

    move-result-object v2

    iget-object v7, p0, Lcom/google/android/gms/internal/k0;->k:Ljava/util/List;

    invoke-interface {v7}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object v7

    :goto_3
    invoke-interface {v7}, Ljava/util/Iterator;->hasNext()Z

    move-result v8

    if-eqz v8, :cond_6

    invoke-interface {v7}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v8

    check-cast v8, Lcom/google/android/gms/internal/o0;

    invoke-virtual {v8, v5, v6, v4, v2}, Lcom/google/android/gms/internal/o0;->a(JILjava/lang/Object;)Z

    goto :goto_3

    :cond_6
    return-void

    :cond_7
    const-string v4, "status"

    invoke-virtual {v2, v4}, Lorg/json/JSONObject;->getJSONArray(Ljava/lang/String;)Lorg/json/JSONArray;

    move-result-object v2

    invoke-virtual {v2}, Lorg/json/JSONArray;->length()I

    move-result v4

    if-lez v4, :cond_8

    invoke-virtual {v2, v3}, Lorg/json/JSONArray;->getJSONObject(I)Lorg/json/JSONObject;

    move-result-object v2

    invoke-direct {p0, v5, v6, v2}, Lcom/google/android/gms/internal/k0;->a(JLorg/json/JSONObject;)V

    return-void

    :cond_8
    const/4 v2, 0x0

    iput-object v2, p0, Lcom/google/android/gms/internal/k0;->j:Lcom/google/android/gms/cast/k;

    invoke-direct {p0}, Lcom/google/android/gms/internal/k0;->k()V

    invoke-direct {p0}, Lcom/google/android/gms/internal/k0;->h()V

    invoke-direct {p0}, Lcom/google/android/gms/internal/k0;->j()V

    invoke-direct {p0}, Lcom/google/android/gms/internal/k0;->i()V

    iget-object v4, p0, Lcom/google/android/gms/internal/k0;->t:Lcom/google/android/gms/internal/o0;

    invoke-virtual {v4, v5, v6, v3, v2}, Lcom/google/android/gms/internal/o0;->a(JILjava/lang/Object;)Z
    :try_end_1
    .catch Lorg/json/JSONException; {:try_start_1 .. :try_end_1} :catch_0

    return-void

    :catch_0
    move-exception v2

    iget-object v4, p0, Lcom/google/android/gms/internal/s;->a:Lcom/google/android/gms/internal/j0;

    new-array v0, v0, [Ljava/lang/Object;

    invoke-virtual {v2}, Lorg/json/JSONException;->getMessage()Ljava/lang/String;

    move-result-object v2

    aput-object v2, v0, v3

    aput-object p1, v0, v1

    const-string p1, "Message is malformed (%s); ignoring: %s"

    invoke-virtual {v4, p1, v0}, Lcom/google/android/gms/internal/j0;->c(Ljava/lang/String;[Ljava/lang/Object;)V

    return-void

    :sswitch_data_0
    .sparse-switch
        -0x6d1d76e8 -> :sswitch_4
        -0x430e23f9 -> :sswitch_3
        -0xfa7664a -> :sswitch_2
        0x19b9b2fb -> :sswitch_1
        0x3115c4cd -> :sswitch_0
    .end sparse-switch
.end method

.method public final c(Lcom/google/android/gms/internal/n0;Lorg/json/JSONObject;)J
    .locals 5
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;,
            Lcom/google/android/gms/internal/zzbdb;
        }
    .end annotation

    new-instance v0, Lorg/json/JSONObject;

    invoke-direct {v0}, Lorg/json/JSONObject;-><init>()V

    invoke-virtual {p0}, Lcom/google/android/gms/internal/s;->c()J

    move-result-wide v1

    iget-object v3, p0, Lcom/google/android/gms/internal/k0;->o:Lcom/google/android/gms/internal/o0;

    invoke-virtual {v3, v1, v2, p1}, Lcom/google/android/gms/internal/o0;->a(JLcom/google/android/gms/internal/n0;)V

    const/4 p1, 0x1

    invoke-virtual {p0, p1}, Lcom/google/android/gms/internal/p;->a(Z)V

    :try_start_0
    const-string p1, "requestId"

    invoke-virtual {v0, p1, v1, v2}, Lorg/json/JSONObject;->put(Ljava/lang/String;J)Lorg/json/JSONObject;

    const-string p1, "type"

    const-string v3, "PLAY"

    invoke-virtual {v0, p1, v3}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    const-string p1, "mediaSessionId"

    invoke-direct {p0}, Lcom/google/android/gms/internal/k0;->l()J

    move-result-wide v3

    invoke-virtual {v0, p1, v3, v4}, Lorg/json/JSONObject;->put(Ljava/lang/String;J)Lorg/json/JSONObject;

    if-eqz p2, :cond_0

    const-string p1, "customData"

    invoke-virtual {v0, p1, p2}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;
    :try_end_0
    .catch Lorg/json/JSONException; {:try_start_0 .. :try_end_0} :catch_0

    :catch_0
    :cond_0
    invoke-virtual {v0}, Lorg/json/JSONObject;->toString()Ljava/lang/String;

    move-result-object p1

    const/4 p2, 0x0

    invoke-virtual {p0, p1, v1, v2, p2}, Lcom/google/android/gms/internal/s;->a(Ljava/lang/String;JLjava/lang/String;)V

    return-wide v1
.end method

.method public final d()J
    .locals 13

    invoke-virtual {p0}, Lcom/google/android/gms/internal/k0;->e()Lcom/google/android/gms/cast/MediaInfo;

    move-result-object v0

    const-wide/16 v1, 0x0

    if-nez v0, :cond_0

    return-wide v1

    :cond_0
    iget-wide v3, p0, Lcom/google/android/gms/internal/k0;->i:J

    cmp-long v5, v3, v1

    if-nez v5, :cond_1

    return-wide v1

    :cond_1
    iget-object v3, p0, Lcom/google/android/gms/internal/k0;->j:Lcom/google/android/gms/cast/k;

    invoke-virtual {v3}, Lcom/google/android/gms/cast/k;->n()D

    move-result-wide v3

    iget-object v5, p0, Lcom/google/android/gms/internal/k0;->j:Lcom/google/android/gms/cast/k;

    invoke-virtual {v5}, Lcom/google/android/gms/cast/k;->q()J

    move-result-wide v5

    iget-object v7, p0, Lcom/google/android/gms/internal/k0;->j:Lcom/google/android/gms/cast/k;

    invoke-virtual {v7}, Lcom/google/android/gms/cast/k;->o()I

    move-result v7

    const-wide/16 v8, 0x0

    cmpl-double v10, v3, v8

    if-eqz v10, :cond_7

    const/4 v8, 0x2

    if-eq v7, v8, :cond_2

    goto :goto_1

    :cond_2
    invoke-virtual {v0}, Lcom/google/android/gms/cast/MediaInfo;->n()J

    move-result-wide v7

    iget-object v0, p0, Lcom/google/android/gms/internal/p;->e:Lcom/google/android/gms/common/util/b;

    invoke-interface {v0}, Lcom/google/android/gms/common/util/b;->b()J

    move-result-wide v9

    iget-wide v11, p0, Lcom/google/android/gms/internal/k0;->i:J

    sub-long/2addr v9, v11

    cmp-long v0, v9, v1

    if-gez v0, :cond_3

    move-wide v9, v1

    :cond_3
    cmp-long v0, v9, v1

    if-nez v0, :cond_4

    return-wide v5

    :cond_4
    long-to-double v9, v9

    invoke-static {v9, v10}, Ljava/lang/Double;->isNaN(D)Z

    mul-double v9, v9, v3

    double-to-long v3, v9

    add-long/2addr v5, v3

    cmp-long v0, v7, v1

    if-lez v0, :cond_5

    cmp-long v0, v5, v7

    if-lez v0, :cond_5

    move-wide v1, v7

    goto :goto_0

    :cond_5
    cmp-long v0, v5, v1

    if-gez v0, :cond_6

    goto :goto_0

    :cond_6
    move-wide v1, v5

    :goto_0
    return-wide v1

    :cond_7
    :goto_1
    return-wide v5
.end method

.method public final e()Lcom/google/android/gms/cast/MediaInfo;
    .locals 1

    iget-object v0, p0, Lcom/google/android/gms/internal/k0;->j:Lcom/google/android/gms/cast/k;

    if-nez v0, :cond_0

    const/4 v0, 0x0

    return-object v0

    :cond_0
    invoke-virtual {v0}, Lcom/google/android/gms/cast/k;->m()Lcom/google/android/gms/cast/MediaInfo;

    move-result-object v0

    return-object v0
.end method

.method public final f()Lcom/google/android/gms/cast/k;
    .locals 1

    iget-object v0, p0, Lcom/google/android/gms/internal/k0;->j:Lcom/google/android/gms/cast/k;

    return-object v0
.end method

.method public final g()J
    .locals 2

    invoke-virtual {p0}, Lcom/google/android/gms/internal/k0;->e()Lcom/google/android/gms/cast/MediaInfo;

    move-result-object v0

    if-eqz v0, :cond_0

    invoke-virtual {v0}, Lcom/google/android/gms/cast/MediaInfo;->n()J

    move-result-wide v0

    return-wide v0

    :cond_0
    const-wide/16 v0, 0x0

    return-wide v0
.end method
